package com.lemon.rpcframe.dao.entity;

import java.util.Date;

import com.lemon.rpcframe.annotation.SCFMember;
import com.lemon.rpcframe.annotation.SCFSerializable;
import com.lemon.rpcframe.dao.annotation.Id;
import com.lemon.rpcframe.dao.annotation.Table;

/**
 * 等待执行的任务
 * @author wangyazhou
 * @version 1.0
 * @date  2015年8月24日 下午8:09:33
 * @see 
 * @since
 */
@Table(name = "t_task_executable")
@SCFSerializable
public class TaskExecutableBean {

    @Id
    @SCFMember
    private long ID; //业务无关

    @SCFMember
    private long jobId; //针对一个TASK的时间定义叫做一具jobid 这个是全局唯一的

    @SCFMember
    private String taskId;//同一个任务的内部序列

    @SCFMember
    private Date createDate;// 创建时间

    @SCFMember
    private Date modifyDate;// 修改时间

    @SCFMember
    private String taskGroup;//多个task组成一个taskgroup 同一个组完成的是同一个任务

    @SCFMember
    private String taskIdentity;//task的唯一标识符

    @SCFMember
    private String mainClass;

    @SCFMember
    private String cronExpression;//执行时间表达式 (和 quartz 表达式一样)

    @SCFMember
    private Date triggerDate;// 下一次执行时间

    @SCFMember
    private String dependency;

    @SCFMember
    private String submitGroup = "web";//提交客户端的节点组

    @SCFMember
    private String extParams;//额外的参数, 需要传给taskTracker的

    @SCFMember
    private boolean running = false;//是否正在执行

    @SCFMember
    private int priority; //值越大  优先级越低

    @SCFMember
    private int retryTimes = 0;//重试次数

    public long getID() {
        return ID;
    }

    public void setID(long iD) {
        ID = iD;
    }

    public long getJobId() {
        return jobId;
    }

    public void setJobId(long jobId) {
        this.jobId = jobId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getTaskGroup() {
        return taskGroup;
    }

    public void setTaskGroup(String taskGroup) {
        this.taskGroup = taskGroup;
    }

    public String getTaskIdentity() {
        return taskIdentity;
    }

    public void setTaskIdentity(String taskIdentity) {
        this.taskIdentity = taskIdentity;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public Date getTriggerDate() {
        return triggerDate;
    }

    public void setTriggerDate(Date triggerDate) {
        this.triggerDate = triggerDate;
    }

    public String getSubmitGroup() {
        return submitGroup;
    }

    public void setSubmitGroup(String submitGroup) {
        this.submitGroup = submitGroup;
    }

    public String getExtParams() {
        return extParams;
    }

    public void setExtParams(String extParams) {
        this.extParams = extParams;
    }

    public boolean isRunning() {
        return running;
    }

    public void setRunning(boolean running) {
        this.running = running;
    }

    public String getDependency() {
        return dependency;
    }

    public void setDependency(String dependency) {
        this.dependency = dependency;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public int getRetryTimes() {
        return retryTimes;
    }

    public void setRetryTimes(int retryTimes) {
        this.retryTimes = retryTimes;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getMainClass() {
        return mainClass;
    }

    public void setMainClass(String mainClass) {
        this.mainClass = mainClass;
    }

}
